package simulation.CreatorPackage;

import java.util.Scanner;

import simulation.Factory;
import simulation.Mass;
import simulation.Model;
import simulation.Muscle;

public class muscleCreator extends Creator {
	private final Factory myFactory;

	public muscleCreator(Factory factory) {
		myFactory=factory;
	}

	@Override
	public void createObjectInModel(Scanner line, Model model) {
		Mass m1 = myFactory.getMass(line.nextInt());
    	Mass m2 = myFactory.getMass(line.nextInt());
        double restLength = line.nextDouble();
        double ks = line.nextDouble();
        double amplitude=line.nextDouble();
        model.add(new Muscle(m1, m2, restLength, ks,amplitude));
    	
		// TODO Auto-generated method stub

	}

}
